<?php
/*echo 'This is view of Paginator';
echo $this->currentUrl;*/

	$linkStart 		= $this->currentUrl . '/page/' . $this->first;
	
	$linkPrevious = '#';
	if(isset($this->previous)){
		$linkPrevious 	= $this->currentUrl . '/page/' . $this->previous;
	}
	$linkNext = '#';
	if(isset($this->next)){
		$linkNext 		= $this->currentUrl . '/page/' . $this->next;
	}
	
	$linkEnd 		= $this->currentUrl . '/page/' . $this->last;
	
	$strPage  = '';

	foreach ($this->pagesInRange as $key){
		if($this->current == $key){
			$strPage .= '<span>' . $key .'</span>';
		}else{
			$linkPage = $this->currentUrl . '/page/' . $key;
			$strPage .= '<a href="' . $linkPage . '">' . $key .'</a>'; 
		}
	}

	$page = 'Page ' . $this->current .' Of ' . $this->last;
?>
<div class="button2-right">
	<div class="start">		
		<a href="<?php echo $linkStart;?>" title="Start">Start</a>		
	</div>
</div>

<div class="button2-right">
	<div class="prev">
		<a href="<?php echo $linkPrevious;?>" title="Prev" >Prev</a>
	</div>
</div>

<div class="button2-left">
	<div class="page">
		<?php echo $strPage;?>
	
	</div>
</div>

<div class="button2-left">
	<div class="end">
		<a href="<?php echo $linkNext;?>" title="Next" >Next</a>
	</div>
</div>

<div class="button2-left">
	<div class="end">
		<a href="<?php echo $linkEnd;?>" title="End" >End</a>
	</div>
</div>
<div class="limit">
	<?php echo $page;?>
</div>
